import request from '@/utils/request'

export function goodsList(query) {
  return request({
    url: '/goods/list',
    method: 'get',
    params: query
  })
}

export function goodsDetailList(query) {
  return request({
    url: '/goods/detailList',
    method: 'get',
    params: query
  })
}

export function checkout(query) {
  return request({
    url: '/goods/checkout',
    method: 'get',
    params: query
  })
}

export function createUser(data) {
  return request({
    url: '/goods/create',
    method: 'post',
    data
  })
}

export function chargeByAliPay(data) {
  return request({
    url: '/goods/chargebyalipay',
    method: 'post',
    data
  })
}

export function checkChargeStatus(query) {
  return request({
    url: '/goods/checkchargestatus',
    method: 'get',
    params: query
  })
}

export function addOrder(query) {
  return request({
    url: '/goods/addOrder',
    method: 'get',
    params: query
  })
}

export function checkAliPayStatus(query) {
  return request({
    url: '/goods/checkalipaystatus',
    method: 'get',
    params: query
  })
}

export function readMechanismUser(query) {
  return request({
    url: '/goods/detail',
    method: 'get',
    params: query
  })
}
